package com.fwmagic.spark.sql

import org.apache.spark.sql.{DataFrame, SparkSession}

object SelectHiveTable {
  def main(args: Array[String]): Unit = {
    val spark = SparkSession.builder()
      .appName("selectHiveTable")
      .enableHiveSupport()
      .getOrCreate()
    val df: DataFrame = spark.sql(
      """
        |select *
        |from
        |test.user_address
        |limit 10
        |""".stripMargin)

    df.show()

    spark.close()

  }

}
